package com.coupons.business.category.service;

import java.util.List;

import com.coupons.business.category.controller.ICategoryManager;
import com.coupons.business.common.exception.BaseCouponsAppException;
import com.coupons.business.common.vo.Category;
import com.coupons.business.category.dao.ICategoryDAO;

public class CategoryManagerService implements ICategoryManager
{
	ICategoryDAO categoryDAO;  
	public ICategoryDAO getCategoryDAO() 
	{
		return categoryDAO;
	}

	public void setCategoryDAO(ICategoryDAO categoryDAO) 
	{
		this.categoryDAO = categoryDAO;
	}

	@Override
	public void createCategory(Category objaCategory)
			throws BaseCouponsAppException 
	{
		categoryDAO.createCategory(objaCategory);
	}

	@Override
	public void updateCategory(Category objaCategory)
			throws BaseCouponsAppException 
	{
		categoryDAO.updateCategory(objaCategory);
	}

	@Override
	public Category getCategory(int CategoryId) throws BaseCouponsAppException 
	{		
		return categoryDAO.getCategory(CategoryId);		 
	}

	@Override
	public List<Category> getAllCategorys(int partnerId, int merchantId) throws BaseCouponsAppException 
	{
			return categoryDAO.getAllCategorys(partnerId, merchantId);
	}
}
